package viz.controller.core
{
	import flare.vis.data.EdgeSprite;
	
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.patterns.command.SimpleCommand;
	
	import viz.model.flare.data.StateItem;
	import viz.model.flare.proxies.FlareDataProxy;
	import viz.model.prefs.proxies.PreferenceProxy;
	import viz.model.prefs.vos.EdgePropVo;

	public class SetActionEdgePropsCmd extends SimpleCommand
	{
		override public function execute(note:INotification):void{
			var flareData:FlareDataProxy = FlareDataProxy( facade.retrieveProxy(FlareDataProxy.NAME)),
				prefs:PreferenceProxy = PreferenceProxy(facade.retrieveProxy(PreferenceProxy.NAME)),
				edge:EdgeSprite = flareData.getEdge(  StateItem(note.getBody()).currentAction  ),
				vo:EdgePropVo = EdgePropVo( prefs.getProperty( note.getType() ) );

			vo.setEdge( edge );
		}
		
	}
}